package com.dime.physical.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dime.physical.mapper.DimePhysicalpictureMapper;
import com.dime.physical.domain.DimePhysicalpicture;
import com.dime.physical.service.IDimePhysicalpictureService;

/**
 * 人员图片Service业务层处理
 * 
 * @author Tiny
 * @date 2023-09-14
 */
@Service
public class DimePhysicalpictureServiceImpl implements IDimePhysicalpictureService 
{
    @Autowired
    private DimePhysicalpictureMapper dimePhysicalpictureMapper;

    /**
     * 查询人员图片
     * 
     * @param id 人员图片主键
     * @return 人员图片
     */
    @Override
    public DimePhysicalpicture selectDimePhysicalpictureById(String id)
    {
        return dimePhysicalpictureMapper.selectDimePhysicalpictureById(id);
    }

    /**
     * 查询人员图片列表
     * 
     * @param dimePhysicalpicture 人员图片
     * @return 人员图片
     */
    @Override
    public List<DimePhysicalpicture> selectDimePhysicalpictureList(DimePhysicalpicture dimePhysicalpicture)
    {
        return dimePhysicalpictureMapper.selectDimePhysicalpictureList(dimePhysicalpicture);
    }

    /**
     * 新增人员图片
     * 
     * @param dimePhysicalpicture 人员图片
     * @return 结果
     */
    @Override
    public int insertDimePhysicalpicture(DimePhysicalpicture dimePhysicalpicture)
    {
        dimePhysicalpicture.setCreateTime(DateUtils.getNowDate());
        return dimePhysicalpictureMapper.insertDimePhysicalpicture(dimePhysicalpicture);
    }

    /**
     * 修改人员图片
     * 
     * @param dimePhysicalpicture 人员图片
     * @return 结果
     */
    @Override
    public int updateDimePhysicalpicture(DimePhysicalpicture dimePhysicalpicture)
    {
        dimePhysicalpicture.setUpdateTime(DateUtils.getNowDate());
        return dimePhysicalpictureMapper.updateDimePhysicalpicture(dimePhysicalpicture);
    }

    /**
     * 批量删除人员图片
     * 
     * @param ids 需要删除的人员图片主键
     * @return 结果
     */
    @Override
    public int deleteDimePhysicalpictureByIds(String[] ids)
    {
        return dimePhysicalpictureMapper.deleteDimePhysicalpictureByIds(ids);
    }

    /**
     * 删除人员图片信息
     * 
     * @param id 人员图片主键
     * @return 结果
     */
    @Override
    public int deleteDimePhysicalpictureById(String id)
    {
        return dimePhysicalpictureMapper.deleteDimePhysicalpictureById(id);
    }
}
